control
Class IteratorCommunityStates

java.lang.Object
  extended by control.IteratorCommunityStates
All Implemented Interfaces:
java.util.Iterator<CState>

public class IteratorCommunityStates
extends java.lang.Object
implements java.util.Iterator<CState>

This Class is an iterator on community states and allows to build Cartesian product on fly


Field Summary
private  boolean hasNext
           
private  java.util.Iterator<State>[] next
           
private  State[] presentConfiguration
           
private  AvailableServices services
           
 
Constructor Summary
IteratorCommunityStates(AvailableServices services)
           
 
Method Summary
 boolean hasNext()
          says if the iterations of Cartesian product are terminated
 CState next()
          gets the present configuration an creat the next one
 void remove()
          remove operation isn't allows for thhis structures.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

presentConfiguration

private State[] presentConfiguration

next

private java.util.Iterator<State>[] next

services

private AvailableServices services

hasNext

private boolean hasNext
Constructor Detail

IteratorCommunityStates

public IteratorCommunityStates(AvailableServices services)
Method Detail

next

public CState next()
gets the present configuration an creat the next one

Specified by:
next in interface java.util.Iterator<CState>
Returns:
CState

hasNext

public boolean hasNext()
says if the iterations of Cartesian product are terminated

Specified by:
hasNext in interface java.util.Iterator<CState>
Returns:
boolean

remove

public void remove()
remove operation isn't allows for thhis structures. Every remove's call preduce the throw of an exception

Specified by:
remove in interface java.util.Iterator<CState>